package com.beaven.model.model.card;

import com.beaven.model.model.db.Group;
import com.beaven.model.model.db.User;
import java.util.Date;

/**
 * author: Beaven
 * time: 2017/5/18 15:28
 */

public class GroupCard {

  private String id;

  private String name;

  private String ownerId;

  private int notifyLevel;

  private Date joinAt;

  private Date modifyAt;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getOwnerId() {
    return ownerId;
  }

  public void setOwnerId(String ownerId) {
    this.ownerId = ownerId;
  }

  public int getNotifyLevel() {
    return notifyLevel;
  }

  public void setNotifyLevel(int notifyLevel) {
    this.notifyLevel = notifyLevel;
  }

  public Date getJoinAt() {
    return joinAt;
  }

  public void setJoinAt(Date joinAt) {
    this.joinAt = joinAt;
  }

  public Date getModifyAt() {
    return modifyAt;
  }

  public void setModifyAt(Date modifyAt) {
    this.modifyAt = modifyAt;
  }


  public Group build(User owner) {
    Group group = new Group();
    group.setId(id);
    group.setName(name);
    group.setNotifyLevel(notifyLevel);
    group.setJoinAt(joinAt);
    group.setModifyAt(modifyAt);
    group.setOwner(owner);
    return group;
  }
}
